package forms;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class formReviewApp  extends ActionForm {	// Check Case 1 Case 2
	private static final long serialVersionUID = 1L;
	private String numberReviewer = null;

	public String getReviewApp() {
		return numberReviewer;
	}

	public void reset(ActionMapping mapping, HttpServletRequest request) {
		setReviewApp(null);
	}

	public void setReviewApp(String reviewer) {
		this.numberReviewer = reviewer;
	}

	public ActionErrors validate(ActionMapping mapping,
			HttpServletRequest request) {
		ActionErrors errors = new ActionErrors();
		if ((numberReviewer == null) || (Integer.parseInt(numberReviewer) == 0)) {
			errors.add("firstMsgTag1", new ActionMessage("errors.required",
					"Review Process"));
		}
		return errors;
	}
}
